package com.chen.blue.service.system;

import com.chen.blue.domain.delete.system.RoleDelete;
import com.chen.blue.domain.delete.system.UserDelete;
import com.chen.blue.domain.dto.system.RoleDto;
import com.chen.blue.domain.dto.system.UserDto;
import com.chen.blue.domain.dto.system.update.RoleDtoEdit;
import com.chen.blue.domain.dto.system.update.UserDtoEdit;
import com.chen.blue.domain.model.system.RoleModel;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chen.blue.domain.query.system.RoleQuery;
import com.chen.blue.domain.query.system.UserQuery;
import com.chen.blue.domain.vo.system.RoleVo;
import com.chen.blue.domain.vo.system.UserVo;
import com.chen.blue.exception.e.DtoNullException;
import com.chen.blue.exception.e.NoDeleteException;
import com.chen.blue.result.DataResult;

import java.util.List;

/**
 * <p>
 * 角色信息表 服务类
 * </p>
 *
 * @author CLT
 * @since 2024-04-27
 */
public interface IRoleService extends IService<RoleModel> {


    /**
     * 添加角色
     *
     * @param roleDto
     * @return
     * @throws DtoNullException
     */
    boolean addRole(RoleDto roleDto) throws DtoNullException;

    /**
     * 删除角色（内置角色不可删除）
     *
     * @param roleDelete
     * @return
     * @throws DtoNullException
     */
    boolean deleteRole(RoleDelete roleDelete) throws DtoNullException, NoDeleteException;

    /**
     * 更新角色
     *
     * @param roleDtoEdit
     * @return
     * @throws DtoNullException
     */
    boolean updateRoleById(RoleDtoEdit roleDtoEdit) throws DtoNullException;

    /**
     * 条件查询角色
     *
     * @param roleQuery
     * @return
     * @throws DtoNullException
     */
    DataResult<List<RoleVo>> queryRole(RoleQuery roleQuery) throws DtoNullException;

    /**
     * 根据ID查询角色
     *
     * @param id
     * @return
     * @throws DtoNullException
     */
    DataResult<RoleVo> queryRoleById(Long id) throws DtoNullException;


}
